package com.ruoyi.employee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employee.mapper.HrHeatPlanMapper;
import com.ruoyi.employee.domain.HrHeatPlan;
import com.ruoyi.employee.service.IHrHeatPlanService;

/**
 * 高温费方案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
@Service
public class HrHeatPlanServiceImpl implements IHrHeatPlanService 
{
    @Autowired
    private HrHeatPlanMapper hrHeatPlanMapper;

    /**
     * 查询高温费方案
     * 
     * @param planId 高温费方案主键
     * @return 高温费方案
     */
    @Override
    public HrHeatPlan selectHrHeatPlanByPlanId(String planId)
    {
        return hrHeatPlanMapper.selectHrHeatPlanByPlanId(planId);
    }

    /**
     * 查询高温费方案列表
     * 
     * @param hrHeatPlan 高温费方案
     * @return 高温费方案
     */
    @Override
    public List<HrHeatPlan> selectHrHeatPlanList(HrHeatPlan hrHeatPlan)
    {
        return hrHeatPlanMapper.selectHrHeatPlanList(hrHeatPlan);
    }

    /**
     * 新增高温费方案
     * 
     * @param hrHeatPlan 高温费方案
     * @return 结果
     */
    @Override
    public int insertHrHeatPlan(HrHeatPlan hrHeatPlan)
    {
        hrHeatPlan.setCreateTime(DateUtils.getNowDate());
        return hrHeatPlanMapper.insertHrHeatPlan(hrHeatPlan);
    }

    /**
     * 修改高温费方案
     * 
     * @param hrHeatPlan 高温费方案
     * @return 结果
     */
    @Override
    public int updateHrHeatPlan(HrHeatPlan hrHeatPlan)
    {
        hrHeatPlan.setUpdateTime(DateUtils.getNowDate());
        return hrHeatPlanMapper.updateHrHeatPlan(hrHeatPlan);
    }

    /**
     * 批量删除高温费方案
     * 
     * @param planIds 需要删除的高温费方案主键
     * @return 结果
     */
    @Override
    public int deleteHrHeatPlanByPlanIds(String[] planIds)
    {
        return hrHeatPlanMapper.deleteHrHeatPlanByPlanIds(planIds);
    }

    /**
     * 删除高温费方案信息
     * 
     * @param planId 高温费方案主键
     * @return 结果
     */
    @Override
    public int deleteHrHeatPlanByPlanId(String planId)
    {
        return hrHeatPlanMapper.deleteHrHeatPlanByPlanId(planId);
    }
}
